Skip to content

Discover all packaged PHP claim surfaces - #10

Merged
karlwaldman merged 2 commits into
mainfrom
codex/dynamic-claim-surfaces
Aug 11, 2026
Merged

Discover all packaged PHP claim surfaces#10
karlwaldman merged 2 commits into
mainfrom
codex/dynamic-claim-surfaces

Conversation

@karlwaldman

@karlwaldman karlwaldman commented Aug 11, 2026

Copy link
Copy Markdown
Member

Problem

The PHP guard enumerated selected files by hand, so a new root guide, docs subtree, or non-PHP package-data file could bypass it. It also lacked the fixed monthly allowance and requests-per-period aliases enforced in the other SDKs. No current false claim was found in Packagist v2.1.0; this closes the PHP discovery gap for OilpriceAPI/oilpriceapi-api#5644.

Red / green

Red before implementation:

  • the future Composer file regression failed because no archive-wide validator existed
  • a nested docs/guide.md with 1,000 API requests/month and JSON package data with 100 requests per hour bypassed the old PHP-only list

Green at e8e9c26:

  • full PHPUnit: 23 tests, 277 assertions
  • strict Composer validation: green
  • Composer audit: no advisories
  • exact generated Composer archive: clean-installed and all 16 customer-readable files scanned
  • exact packaged fixtures: success, missing config, 401, 403, and 429 green
  • binary package data is excluded; future UTF-8 files of any name or extension are discovered
  • git diff --check: clean

Change

  • scan every UTF-8 file in the exact installed Composer archive
  • add fixed allowance and requests-per-period aliases, with the canonical 50 requests/day exception
  • explicitly exclude CI, tests, scripts, lock/cache, Git metadata, and vendor dependencies from the customer archive
  • bind the clean-install smoke to the installed vendor package and add future nested docs/package-data regressions

Runtime source and Client::VERSION remain unchanged at 2.1.0, so no new Packagist artifact is required.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

PublicClaimsTest now discovers PHP files recursively under src and examples. It also scans root documentation and configuration files. A new test verifies nested source and exception files.

Changes

Public surface validation

Layer / File(s) Summary
Recursive public file discovery and validation
tests/PublicClaimsTest.php
The test recursively discovers PHP files under src and examples, includes root files, normalizes and sorts paths, verifies nested files, and uses the discovered list for product-claim scanning.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: recursive discovery of all packaged PHP claim surfaces.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/dynamic-claim-surfaces

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@karlwaldman
karlwaldman merged commit f574f02 into main Aug 11, 2026
8 checks passed
@karlwaldman
karlwaldman deleted the codex/dynamic-claim-surfaces branch August 11, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant